home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000375_fj@iesd.auc.dk_Sat Mar 12 20:16:12 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  3KB

  1. Received: from iesd.auc.dk by cs.umb.edu with SMTP id AA29758
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Sat, 12 Mar 1994 13:16:53 -0500
  3. Received: from loke.iesd.auc.dk (loke.iesd.auc.dk [130.225.48.20]) by iesd.auc.dk (8.6.5/8.6.5) with ESMTP id TAA10152; Sat, 12 Mar 1994 19:16:50 +0100
  4. From: Frank Jensen <fj@iesd.auc.dk>
  5. Received: from localhost (fj@localhost) by loke.iesd.auc.dk (8.6.4/8.6.4) id TAA24196; Sat, 12 Mar 1994 19:16:12 +0100
  6. Date: Sat, 12 Mar 1994 19:16:12 +0100
  7. Message-Id: <199403121816.TAA24196@loke.iesd.auc.dk>
  8. To: tex-k@cs.umb.edu
  9. Subject: Kpathsearch -- database searching
  10.  
  11.  
  12. It is very nice to see this capability added to the library, and even
  13. nicer that it uses a hash table instead of a linear search.
  14.  
  15. However, ideally I would like to be able to specify the following
  16. search scheme:
  17.  
  18.     setenv TEXINPUTS .:~/TeX/inputs:</usr/local/lib/texmf/ls-R>
  19.  
  20. meaning: first, look in the current directory; then, look in my
  21. personal inputs directory (i.e., ~/TeX/inputs); finally, search the
  22. database file "/usr/local/lib/texmf/ls-R".  Note that I did not
  23. specify any recursive search here.  The reason is that often a file is
  24. supposed to exist in the current directory or not exist at all; a
  25. familiar example is the `aux' file generated by LaTeX -- I don't want
  26. to invoke a recursive search to determine that this file does not
  27. exist.
  28.  
  29. For some other programs (e.g., xdvi and dvips) that generate files
  30. (fonts, in this case) on-the-fly (in other places than the current
  31. directory), it might be appropriate to add an extra path element that
  32. explicitly asks for a recursive search (i.e., the normal path element
  33. "/usr/local/lib/texmf/tex//").
  34.  
  35. Since I never use `//' wildcards in the middle of path element
  36. specifications, the above suggested syntax will suffice for me ...
  37.  
  38. I gather from the sources that the intent is to take each path element
  39. in turn, concatenate it with the file name being searched for, and
  40. match the result against each absolute path associated with the file
  41. name in the database (although the current match function is somewhat
  42. simplistic ;-).
  43.  
  44. The above suggestion doesn't allow for such a match operation.  I see
  45. two possibilities:
  46.  
  47. 1) There is only one (global) database (this is the current
  48.    situation).  Then introduce a new form of path element:
  49.  
  50.     <pattern>
  51.  
  52.    where `pattern' would typically be: "/usr/local/lib/texmf/tex//",
  53.    "/usr/local/lib/texmf/fonts//tfm", etc.
  54.  
  55.    The meaning of such a path element would be to search the global
  56.    database _only_ (likewise, the existing path elements without the
  57.    angle brackets should be interpreted as a request for directory
  58.    search only).  Then one can explicitly ask for a recursive search
  59.    by specifying an identical pattern without the angle brackets.
  60.  
  61.    [It is easy to change the current implementation to achieve this
  62.    behavior; a simple change to the `path_search' function in
  63.    "pathsearch.c" should suffice.]
  64.  
  65. 2) This suggestion is just a minor alteration of (1) to allow for
  66.    multiple database files.  Simply include the name of the database
  67.    file with the pattern; one possible syntax is:
  68.  
  69.     <pattern,database>
  70.  
  71.  
  72. For now, I suggest implementing (1).  [Anyway, (2) might not be the
  73. best way to introduce multiple database files.]
  74.  
  75. ---
  76. Frank Jensen,   fj@iesd.auc.dk
  77. Department of Mathematics and Computer Science
  78. Aalborg University
  79. DENMARK